package com.kxf.mvptest.presenter;

import android.content.Context;
import android.graphics.Bitmap;

import com.kxf.mvptest.contract.GetPicContract;
import com.kxf.mvptest.model.GetPicModelImpl;

/**
 * @ProjectName: AndroidTestDemo
 * @Package: com.kxf.mvptest.presenter
 * @ClassName: GetPicPresenterImpl
 * @Description: java类作用描述
 * @Author: kuangxuefeng
 * @qq: 1024883177
 * @CreateDate: 2020/5/21 9:16
 */
public class GetPicPresenterImpl extends BasePresenter<GetPicContract.View> implements GetPicContract.Presenter {

    public GetPicPresenterImpl(GetPicContract.View view) {
        super(view);
    }

    @Override
    public void getPic(final Context context) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                Bitmap bmp = new GetPicModelImpl().getPic(context);
                view.showPic(bmp);
            }
        }).start();
    }
}
